﻿using BS.Infra;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace BS.Read.Api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SlaughterEnterpriseController : ControllerBase
    {
        private readonly IMediator _mediator;

        public SlaughterEnterpriseController(IMediator mediator)
        {
            _mediator = mediator;
        }

        /// <summary>
        /// 显示屠宰企业
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<ApiResult> DisplaySlaughterEnterprise([FromQuery] GetSlaughterEnterListRequestDTO parm)
        {
            return await _mediator.Send(parm);
        }   
    }
}
